#include <iostream>
using namespace std;

int main()
{
	int M, N, rabbit;

	cout << "Heads: ";
	cin >> M;
	cout << "Feet: ";
	cin >> N;

	rabbit = N / 2 - M;
	cout << "Chicken: " << M - rabbit << endl;
	cout << "Rabbit: " << rabbit << endl;

	return 0;
}
